﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DcsGauges.Shared.DataStructures;

namespace DcsGauges.Shared.Packets
{
    /// <summary>
    /// 
    /// </summary>
    /// <example>
    /// <data>LeftEngineRPM=250;RightengineRPM=365</data>
    /// </example>
    public class DataPacket : Packet
    {
        public const string     PACKET_NAME             = "data";
        public const char       ASSIGNMENT_CHAR         = '=';

        public IList<Tuple<DcsProperty, float>> Values { get; private set; }

        public override string  PacketName      { get { return PACKET_NAME; }}

        public DataPacket(DcsProperty prop, float value) : base(PacketTypes.Data)
        {
            this.Values = new List<Tuple<DcsProperty, float>>() { new Tuple<DcsProperty, float>(prop, value) };
        }

        public DataPacket(IList<Tuple<DcsProperty, float>> values) : base(PacketTypes.Data)
        {
            this.Values = values;
        }
        
    }
}
